home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir26
/
epi601_2.zip
/
FILES07.EXE
/
TUTOR2.PGM
< prev
next >
Wrap
Text File
|
1994-08-22
|
16KB
|
463 lines
********************************************************
* *
* TUTOR2.PGM *
* *
********************************************************
set pause=off
cls
echo
echo
echo
echo
echo
echo
echo This Tutorial continues the instruction in ANALYSIS begun
echo in the TUTOR1.PGM program.
echo
echo It provides an introduction to some of the topics in
echo Chapter 11 of the Epi Info manual.
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo You can learn from this tutorial how to:
echo
echo Run DOS commands from ANALYSIS
echo BROWSE through or UPDATE data files
echo Control the treatment of missing values
echo Use the SELECT, DEFINE, RECODE, and IF commands
echo Manage dates and calculate intervals
echo SET formatting options
echo Save commands as programs
echo
echo
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo Let's begin by making a copy of the OSWEGO.REC file
echo so that we can alter it without changing the original.
echo
echo The DOS command lets you use DOS commands, such as COPY
echo or even run other programs like EPED.
echo
echo
echo Please type: DOS COPY OSWEGO.REC OSWEGO2.REC
echo
?EPI> ?
CLS
echo
echo
echo
echo
echo
echo
echo Now type: READ Oswego2
echo
echo
echo (You can use either upper or lower case for commands.)
echo
echo
?EPI> ?
CLS
echo
echo
echo
echo
echo
echo In the tutorial we will do some analysis of
echo cases in the OSWEGO2 file. To select cases only,
echo
echo
echo Type: SELECT ILL = "Y"
echo
echo (Be sure it is a capital "Y"; the rest can be upper or lower case.)
?EPI> ?
CLS
echo
echo
echo
echo The BROWSE command lets you look at the data file in
echo spreadsheet format. You can move around with the
echo arrow keys and see all the data, but, for safety's
echo sake, cannot change the values.
echo
echo To BROWSE, press the <F4> key or type BROWSE
echo
echo When you see the data, move around and verify that
echo you can see the whole file. Try out the prompts
echo at the bottom. When you have finished, press <F10>.
echo
?EPI> ?
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo UPDATE is just like BROWSE, except that you can change
echo the data items. This is the only command in
echo ANALYSIS that actually changes the original
echo data file; it is important to make a backup file,
echo as we have already done, before using UPDATE.
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo To use UPDATE, simply type UPDATE. You will see the same
echo "spreadsheet" you used in BROWSE, but now changes can
echo be entered in the space at the top. Your entry will appear
echo at the location of the cursor bar in the data area.
echo
echo Type UPDATE and change the blank values for TIMESUPPER
echo to 2000, the approximate mean of the others. Times like
echo "1930" mean 19 hours and 30 minutes. Change them to
echo 1950, since we will later divide by 100 to get times
echo in hours. Do this for both TIMESUPPER and ONSETTIME.
?EPI> ?
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo In subsequent operations, we want ANALYSIS to
echo exclude missing values from the calculations and tables.
echo Normally, they are included, and are treated
echo as zeroes. This can be changed with the SET
echo command.
echo
echo
echo
echo
echo Type: SET IGNORE = ON
?EPI> ?
echo
cls
echo
echo
echo
echo You have probably noticed that TIMESUPPER and
echo ONSETTIME are in military time, but that the
echo date for TIMESUPPER when the offending meal
echo was eaten is not in the data file, since in
echo all cases it was 04/18.
echo
echo We will now proceed through the several steps
echo necessary to calculate an incubation
echo period for each case.
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo First we will DEFINE a new variable, since we
echo need a place to store the result of the
echo calculation. Let's call it INCUBATION,
echo since variables can have names of up to 10 letters.
echo We will make it a numeric variable with one
echo decimal place, since the incubation will be
echo in hours, to the nearest half hour.
echo
echo
echo Type: DEFINE INCUBATION ##.#
echo
?EPI> ?
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo We would like to convert both ONSETTIME and TIMESUPPER
echo to an absolute number of hours with a defined starting point
echo so that we can subtract TIMESUPPER from ONSETTIME to get
echo INCUBATION in hours.
echo Arbitrarily we choose the first instant of 04/18 as the
echo reference point at which to start the clock.
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo Since all TIMESUPPERs were on 04/18, we do not need
echo to adjust the hour of onset if ONSETDATE was 04/18.
echo For cases with ONSETDATE on 04/19, we can use
echo the IF command to adjust ONSETTIME by adding 2400
echo hours if ONSETDATE was 04/19.
echo
echo
echo Type: IF ONSETDATE = "04/19" THEN ONSETTIME = ONSETTIME + 2400
echo
echo (Note that values for dates must be in quotation marks.)
?EPI> ?
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo Now we are ready to calculate INCUBATION.
echo
echo Type: INCUBATION = (ONSETTIME - TIMESUPPER)/100
echo
?EPI> ?
cls
echo
echo
echo
echo To assess the results,
echo
echo Type: FREQ INCUBATION
?EPI> ?
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo Now type: BAR INCUBATION
?EPI> ?
cls
echo
echo
echo
echo
echo We hope the results are reasonable for a staphylococcal
echo food poisoning outbreak. If not, perhaps you typed
echo one of the commands wrong, but, in any case, you
echo have seen how mathematical expressions and IF
echo statements work in ANALYSIS.
echo
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo The next task is to group the AGEs so that they
echo can be handled more easily.
echo
echo This is a job for the RECODE command.
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo First we need another variable to receive the
echo results; let's call it AGEGROUP. It will be
echo a text or "string" variable since the groups
echo will be items like "0 to 20" which are not
echo entirely numeric.
echo
echo Type: DEFINE AGEGROUP __________
echo
echo (AGEGROUP is followed by 10 underline characters, just
echo as though we were creating a questionnaire variable.)
echo
?EPI> ?
cls
echo
echo
echo RECODE always recodes a known variable like
echo AGE to a variable (sometimes the same one)
echo like AGEGROUP. Since AGE is numeric, and
echo we want new values containing text,
echo we had to create the text variable AGEGROUP
echo to receive the results.
echo
echo Type:
echo
echo RECODE AGE to AGEGROUP 0-19="0 to 19" 20-39="20 to 39" 40-59="40 to 59"
echo
echo
?EPI> ?
cls
echo
echo
echo The older group didn't fit on the same line, and, since RECODE's
echo are cumulative, we can include this group in another statement.
echo In a program file, to be described later, you can type lines
echo longer than 80 characters or use "\" to continue a line,
echo but, for now:
echo
echo Type: RECODE AGE to AGEGROUP 60-HI=">=60"
echo
echo ("HI" is an expression for the highest value.)
?EPI> ?
echo
cls
echo
echo
echo
echo To test the hypothesis that INCUBATION and AGEGROUP
echo are associated (and that you typed in all the
echo commands correctly),
echo
echo Type: TABLES AGEGROUP INCUBATION
echo
?EPI> ?
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo Another way to look at a possible association would
echo be to make a scatter graph of AGE and INCUBATION
echo since both are numeric variables. A
echo least squares regression line will be
echo useful here, so we end the command with "/R".
echo
echo Type: SCATTER AGE INCUBATION /R
echo
?EPI> ?
cls
echo
echo Dates are complex and should be studied in chapter 11 of the
echo manual, but we will do a simple subtraction to give the
echo general idea. The OSWEGO data set has only two dates,
echo 04/18 and 04/19, but these will do for practice.
echo
echo Let's pretend that we want an incubation
echo period in days and that it will be obtained
echo from subtracting 04/18 from ONSETDATE.
echo
echo Type: Incubation = ONSETDATE - "04/18"
echo
echo The result will be in DAYS and the literal value "04/18" must be
echo in quotation marks since dates are a special form of text variable.
?EPI> ?
cls
echo
echo
echo
echo The INCUBATIONS should all be 0 or 1 days, which
echo of course, is not very useful here, but
echo would be appropriate for diseases with
echo longer incubation periods.
echo
echo
echo Type: LIST ONSETDATE INCUBATION
?EPI> ?
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo The SET command allows setting many options that
echo affect the appearance or the printing of tables.
echo
echo Press the <F1> key and choose the section of
echo the help file that describes the SET commands.
echo Read about the possible settings and then
echo press escape to continue with the tutorial.
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo
echo
echo
echo Type: SET PERCENTS = ON
echo
?EPI> ?
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo
echo Each cell in the table will now contain percentages.
echo Those with the right arrow ">" are percentages of
echo the totals on the right; the others have the
echo totals at the bottom for denominators.
echo
echo Type: TABLES AGE SEX
?EPI> ?
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo SET commands and others can be preserved in
echo a program file with the special name
echo CONFIG.EPI so that they take effect
echo automatically each time ANALYSIS
echo is run. More details are given
echo in the Epi Info manual.
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo
echo
echo Our final topic is PROGRAM files. A program is
echo merely a series of Epi Info commands saved in
echo a text file. You can create a program in EPED
echo by typing one command on each line and then
echo saving the file with a name ending in .PGM, such
echo as OUTBREAK.PGM. To run the program in ANALYSIS
echo you would use the command RUN OUTBREAK.
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo If you have already typed several commands from
echo the keyboard in ANALYSIS and want to save them
echo in a program file, the SAVE command will put
echo up to 20 previous commands in a file. You would
echo type SAVE followed by the filename, such as
echo CLEANUP.PGM, and the program file will be created
echo automatically. You could then use EPED to
echo edit and embellish the program before
echo RUNning it in ANALYSIS.
echo
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo This completes the TUTOR2 tutorial.
echo You have learned to:
echo
echo Run DOS commands from ANALYSIS
echo BROWSE through or UPDATE data files
echo Control the treatment of missing values
echo Use the SELECT, DEFINE, RECODE, and IF commands
echo Manage dates and calculate intervals
echo SET formatting options
echo Save commands as programs
?Press <Enter> to continue (<F10> to QUIT): ?
cls
echo
echo
echo
echo The way to learn more is to write programs
echo to analyze your own data.
echo Try to start with the simple operations
echo first and work up to the more complex.
echo
echo Good luck. We hope you enjoy using Epi Info.
?Press <Enter> to leave the tutorial: ?